package com.pan.demo.dao;

import com.pan.demo.entity.Animal;
import com.pan.demo.utils.DemoDataTool;
import com.pan.framework.anno.common.MyInject;
import com.pan.framework.anno.dao.MyDao;

import java.util.List;

@MyDao(name = "demoDao")
public class DemoDaoImpl implements DemoDao{

    @MyInject(name = "dataTool")
    private DemoDataTool dataTool;

    public DemoDaoImpl(){

    }

    public List<Animal> query(){

        try {
            return dataTool.newMockData(Animal.class,10);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
}
